import React, { Component } from 'react';
import { Divider, Popconfirm } from 'antd';
import { createList } from '/common/components/HocCRUD';
import * as config from './config';
import MainWrap from '/common/components/HocCRUD/MainWrap';
import { actionFunc } from '@/pages/Host';

@createList({
  config,
  initSearchData: (props, data) => {
    return {
      ...data,
      fuzzyMatch: 'code,name',
    };
  },
  initFilterData: null,
})
export default class EmployeeType extends Component {
  render() {

    const tableProps = {
      columns: [
        {
          title: '序号',
          dataIndex: 'no',
          key: 'no',
        },
        {
          title: '员工类型编码',
          dataIndex: 'code',
          key: 'code',
        },
        {
          title: '员工类型名称',
          dataIndex: 'name',
          key: 'name',
        },
        {
          title: '操作',
          key: 'action',
          render: (text, record) => (actionFunc(this.props, text, record)),
        },
      ],
    };

    return (
      <MainWrap
        {...this.props}
        tableProps={tableProps}
        headActionOption = {{export:false,import:false}}
      >
        {
          this.props.children
        }
      </MainWrap>
    );
  }
}
